package src.Thirteen;

import javax.swing.*;
import java.awt.*;

public class BackgroundJTextArea extends JTextArea {

    private static final long serialVersionUID = -4157782271632761973L;
    private Image image;

    public BackgroundJTextArea(String path){
        ImageIcon icon = new ImageIcon(path);
        image = icon.getImage();
        setOpaque(false);
    }

    public void paint(Graphics g){
        g.drawImage(image,0,0,this);
        super.paint(g);
    }
}
